<?php
/**
 * +--------------------------------------------------------+
 * @Created by PhpStorm.
 * @Category Store.php
 * @Depiction:
 * Author: hwy
 * Date: 2020/9/30  16:48
 * +--------------------------------------------------------+
 */

namespace App\Http\Requests\SettingConfigTab;


use App\Http\Requests\BaseRequestsPost;

class Store extends BaseRequestsPost
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'title' => 'required',
            'eng_title' => 'required',
            'icon' => 'required',
            'type' => 'required',
        ];
    }

    /**
     * 定义字段名中文
     *
     * @return array
     */
    public function attributes()
    {
        return [
            'title' => '配置分类名称',
            'eng_title' => '配置分类字段',
            'icon' => '图标',
            'type' => '类型',
        ];
    }

    public function messages()
    {
        return [
            'title.required' => '配置分类名称不能为空',
            'eng_title.required' => '配置分类字段不能为空',
            'icon.required' => '图标不能为空',
            'type.required' => '类型不能为空',
        ];
    }

}
